package me.zhanshi123.vipsystem.feature;

import cn.nukkit.utils.Config;
import me.zhanshi123.vipsystem.Main;
import me.zhanshi123.vipsystem.feature.vipjoin.VipJoin;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class FeatureManager {
    private Config config;
    private File f = null;

    public Config getConfig() {
        return config;
    }

    public FeatureManager() {
        load();
    }

    private void load() {
        try {
            Main plugin = Main.getInstance();
            f = new File(plugin.getDataFolder(), "features.yml");
            if (!f.exists()) {
                plugin.saveResource("features.yml", false);
            }
            config = new Config(f);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private Map<String, VipFeature> featureMap = new HashMap<>();

    public Map<String, VipFeature> getFeatureMap() {
        return featureMap;
    }
}
